from yagmail import logging
import yagmail


# 日志信息
def loc_ect():
    logging.basicConfig(filename="www.txt", level=logging.DEBUG, filemode="w+", format="%(asctime)s->%(levelname)s->%(message)s")

# 发送邮件
def send_mail(filepath):
    mail=yagmail.SMTP(user='3034738910@qq.com',password='dtvwxyjchccbdcgf',host='smtp.qq.com')
    mail.send(to='3034738910@qq.com',subject="测试报告",contents="今日报告请查收。。。",attachments=filepath)




